(this.webpackJsonparimo=this.webpackJsonparimo||[]).push([[18],{804:function(e,t,a){},815:function(e,t,a){"use strict";a.r(t);var r=a(2),n=a(6),i=a(7),s=a(12),l=a(13),c=a(0),o=a.n(c),m=a(17),u=a(108),p=a(371),d=a(500),f=a(501),g=a(498),h=a(499),b=a(305),E=a(307),v=a(304),w=a(303),C=a(503),S=a(103),P=(a(374),a(804),a(151)),N=a(348),j=a(331),R=a(314),O=a(48),q=function(e){Object(s.a)(a,e);var t=Object(l.a)(a);function a(){var e;Object(n.a)(this,a);for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return(e=t.call.apply(t,[this].concat(s))).state={defaultColDef:{sortable:!0},rowSelection:"single",columnDefs:[{headerName:"ID",field:"id",width:150,filter:!0},{headerName:"\u0418\u043c\u044f",field:"name",filter:!0,width:250},{headerName:"\u041f\u043e\u0447\u0442\u0430",field:"email",filter:!0,width:250},{headerName:"Role",field:"role.description",filter:!0,width:150},{headerName:"\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d",field:"created_at",filter:!0,width:250,cellRendererFramework:function(e){var t=Object(O.e)(e.value);return"".concat(t.getDate(),".").concat(t.getMonth()+1,".").concat(t.getFullYear())}}]},e.onGridReady=function(t){e.gridApi=t.api,e.gridColumnApi=t.columnApi},e.filterSize=function(t){e.props.setRequestParams({limit:t,page:1}),e.props.getUserList(Object(r.a)(Object(r.a)({},e.props.requestParams),{},{limit:t,page:1}))},e.updateSearchQuery=function(t){e.props.setRequestParams({search:t,page:1}),e.props.getUserList(Object(r.a)(Object(r.a)({},e.props.requestParams),{},{search:t,page:1}))},e.onPageChange=function(t){e.props.setRequestParams({page:t}),e.props.getUserList(Object(r.a)(Object(r.a)({},e.props.requestParams),{},{page:t}))},e.onSelectionChanged=function(){var t=e.gridApi.getSelectedRows();e.props.SwitchToAnotherUser(t[0].id||null)},e}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.getUserList(this.props.requestParams)}},{key:"render",value:function(){var e=this,t=this.state,a=t.columnDefs,r=t.defaultColDef,n=t.pageSize;return o.a.createElement(o.a.Fragment,null,o.a.createElement(p.a,{breadCrumbTitle:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439",breadCrumbParent:"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438",breadCrumbActive:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439"}),o.a.createElement(d.a,{className:"app-user-list"},o.a.createElement(f.a,{sm:"12"},o.a.createElement(g.a,null,o.a.createElement(h.a,null,this.props.spinner.includes("users-list")&&o.a.createElement(R.a,null),o.a.createElement("div",{className:"ag-theme-material ag-grid-table"},o.a.createElement("div",{className:"ag-grid-actions d-flex justify-content-between flex-wrap mb-1"},o.a.createElement("div",{className:"sort-dropdown"},o.a.createElement(b.a,{className:"ag-dropdown p-1"},o.a.createElement(E.a,{tag:"div"},"1 - ",n," \u0438\u0437 150",o.a.createElement(P.a,{className:"ml-50",size:15})),o.a.createElement(v.a,{right:!0},o.a.createElement(w.a,{tag:"div",onClick:function(){return e.filterSize(20)}},"20"),o.a.createElement(w.a,{tag:"div",onClick:function(){return e.filterSize(50)}},"50"),o.a.createElement(w.a,{tag:"div",onClick:function(){return e.filterSize(100)}},"100"),o.a.createElement(w.a,{tag:"div",onClick:function(){return e.filterSize(150)}},"150")))),o.a.createElement("div",{className:"filter-actions d-flex"},o.a.createElement(C.a,{className:"w-100 mr-1 mb-1 mb-sm-0",type:"text",placeholder:"\u043f\u043e\u0438\u0441\u043a...",onChange:function(t){return e.updateSearchQuery(t.target.value)},value:this.props.requestParams.search}))),null!==this.props.list?o.a.createElement(S.a.Consumer,null,(function(t){return o.a.createElement(N.AgGridReact,{defaultColDef:r,columnDefs:a,rowData:e.props.list,onGridReady:e.onGridReady,colResizeDefault:"shift",animateRows:!0,pagination:!1,rowSelection:e.state.rowSelection,onSelectionChanged:e.onSelectionChanged.bind(e)})})):null),o.a.createElement("div",{className:"mt-5 pt-5 pt-sm-2"},o.a.createElement(j.a,{pagination:this.props.meta.pagination,onPageChange:this.onPageChange})))))))}}]),a}(o.a.Component);t.default=Object(m.b)((function(e){return{requestParams:e.users.requestParams,list:e.users.list,meta:e.users.meta,spinner:e.helper.spinner}}),{setRequestParams:u.d,getUserList:u.c,SwitchToAnotherUser:u.a})(q)}}]);
//# sourceMappingURL=18.1195eec3.chunk.js.map